#include "vehicle.h"
#include "vehicle_register.h"
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <string>
#include <clocale>


using namespace std;



void main_3_1(){

	cout << "Main3_1" << endl;

	vehicle a1;
	vehicle a2(1994,"volvo", 2000, 4000);
	vehicle a3(1945, "daimler", 49000, 26000);
	vehicle a4;

	a1.Write();
	a2.Write();

	a1.Read();
	a1.Write();

	string utfil;

	vehicle_register  vr;
	
	vr.add(a2);
	vr.add(a1);
	vr.add(a3);
	cout << vr.list() << endl;
	vr.deleta();
	a4.Read();
	vr.WriteToFile();

	vr.CalculateStorageValue();
}
int main()
{
	main_3_1();
	system("pause");
	return 0;
}